package com.mycinema.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.mycinema.entity.Movie;

public interface MovieDao {
	//123
	List<Movie> getAll();
	
	Movie getById(int id);
	
	List<Movie> getMoviesTitleCid(@Param("cid")int cid,@Param("title")String title);
	
	List<Movie> getMoviesWhere(@Param("cid")int cid,@Param("title")String title);
	
	List<Movie> getMoviesTrim(@Param("cid")int cid,@Param("title")String title);
	
	void updateMovie(Movie movie);
	
	void updateTrim(Movie movie);
	
	//瀛愭煡璇紝in,array
	List<Movie> getMoviesInArray(int[] arr);
	
	List<Movie> getMoviesInList(List<Integer> list);
	
	List<Movie> getMoviesInMap(Map map);
	
	//鍒嗛〉鏌ヨ
	List<Movie> getMoviesPage(@Param("cid")int cid,
			@Param("title")String title,
			@Param("startIndex")int startIndex,
			@Param("pageSize")int pageSize);
	
	//璁＄畻鎬昏褰曟暟
	int getRows(@Param("cid")int cid,@Param("title")String title);
	//鎸夌被鍒垹闄ょ數褰�
	void deleteByCid(int cid);
}
